
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module apiclient.discovery</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="apiclient.html"><font color="#ffffff">apiclient</font></a>.discovery</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/apiclient-release/apiclient/discovery.py">/home/jcgregorio/projects/apiclient-release/apiclient/discovery.py</a></font></td></tr></table>
    <p><tt>Client&nbsp;for&nbsp;discovery&nbsp;based&nbsp;APIs<br>
&nbsp;<br>
A&nbsp;client&nbsp;library&nbsp;for&nbsp;Google's&nbsp;discovery&nbsp;based&nbsp;APIs.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br>
<a href="httplib2.html">httplib2</a><br>
<a href="logging.html">logging</a><br>
</td><td width="25%" valign=top><a href="apiclient.mimeparse.html">apiclient.mimeparse</a><br>
<a href="mimetypes.html">mimetypes</a><br>
<a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="random.html">random</a><br>
<a href="re.html">re</a><br>
<a href="json.html">json</a><br>
</td><td width="25%" valign=top><a href="uritemplate.html">uritemplate</a><br>
<a href="urllib.html">urllib</a><br>
<a href="urlparse.html">urlparse</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-build"><strong>build</strong></a>(serviceName, version, http<font color="#909090">=None</font>, discoveryServiceUrl<font color="#909090">='https://www.googleapis.com/discovery/v1/apis/{api}/{apiVersion}/rest'</font>, developerKey<font color="#909090">=None</font>, model<font color="#909090">=None</font>, requestBuilder<font color="#909090">=&lt;class 'apiclient.http.HttpRequest'&gt;</font>)</dt><dd><tt>Construct&nbsp;a&nbsp;Resource&nbsp;for&nbsp;interacting&nbsp;with&nbsp;an&nbsp;API.<br>
&nbsp;<br>
Construct&nbsp;a&nbsp;Resource&nbsp;object&nbsp;for&nbsp;interacting&nbsp;with<br>
an&nbsp;API.&nbsp;The&nbsp;serviceName&nbsp;and&nbsp;version&nbsp;are&nbsp;the<br>
names&nbsp;from&nbsp;the&nbsp;Discovery&nbsp;service.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;serviceName:&nbsp;string,&nbsp;name&nbsp;of&nbsp;the&nbsp;service<br>
&nbsp;&nbsp;version:&nbsp;string,&nbsp;the&nbsp;version&nbsp;of&nbsp;the&nbsp;service<br>
&nbsp;&nbsp;http:&nbsp;httplib2.Http,&nbsp;An&nbsp;instance&nbsp;of&nbsp;httplib2.Http&nbsp;or&nbsp;something&nbsp;that&nbsp;acts<br>
&nbsp;&nbsp;&nbsp;&nbsp;like&nbsp;it&nbsp;that&nbsp;HTTP&nbsp;requests&nbsp;will&nbsp;be&nbsp;made&nbsp;through.<br>
&nbsp;&nbsp;discoveryServiceUrl:&nbsp;string,&nbsp;a&nbsp;URI&nbsp;Template&nbsp;that&nbsp;points&nbsp;to<br>
&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;location&nbsp;of&nbsp;the&nbsp;discovery&nbsp;service.&nbsp;It&nbsp;should&nbsp;have&nbsp;two<br>
&nbsp;&nbsp;&nbsp;&nbsp;parameters&nbsp;{api}&nbsp;and&nbsp;{apiVersion}&nbsp;that&nbsp;when&nbsp;filled&nbsp;in<br>
&nbsp;&nbsp;&nbsp;&nbsp;produce&nbsp;an&nbsp;absolute&nbsp;URI&nbsp;to&nbsp;the&nbsp;discovery&nbsp;document&nbsp;for<br>
&nbsp;&nbsp;&nbsp;&nbsp;that&nbsp;service.<br>
&nbsp;&nbsp;developerKey:&nbsp;string,&nbsp;key&nbsp;obtained<br>
&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;https://code.google.com/apis/console<br>
&nbsp;&nbsp;model:&nbsp;apiclient.Model,&nbsp;converts&nbsp;to&nbsp;and&nbsp;from&nbsp;the&nbsp;wire&nbsp;format<br>
&nbsp;&nbsp;requestBuilder:&nbsp;apiclient.http.HttpRequest,&nbsp;encapsulator&nbsp;for<br>
&nbsp;&nbsp;&nbsp;&nbsp;an&nbsp;HTTP&nbsp;request<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;A&nbsp;Resource&nbsp;object&nbsp;with&nbsp;methods&nbsp;for&nbsp;interacting&nbsp;with<br>
&nbsp;&nbsp;the&nbsp;service.</tt></dd></dl>
 <dl><dt><a name="-build_from_document"><strong>build_from_document</strong></a>(service, base, future<font color="#909090">=None</font>, http<font color="#909090">=None</font>, developerKey<font color="#909090">=None</font>, model<font color="#909090">=None</font>, requestBuilder<font color="#909090">=&lt;class 'apiclient.http.HttpRequest'&gt;</font>)</dt><dd><tt>Create&nbsp;a&nbsp;Resource&nbsp;for&nbsp;interacting&nbsp;with&nbsp;an&nbsp;API.<br>
&nbsp;<br>
Same&nbsp;as&nbsp;`<a href="#-build">build</a>()`,&nbsp;but&nbsp;constructs&nbsp;the&nbsp;Resource&nbsp;object<br>
from&nbsp;a&nbsp;discovery&nbsp;document&nbsp;that&nbsp;is&nbsp;it&nbsp;given,&nbsp;as&nbsp;opposed&nbsp;to<br>
retrieving&nbsp;one&nbsp;over&nbsp;HTTP.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;service:&nbsp;string,&nbsp;discovery&nbsp;document<br>
&nbsp;&nbsp;base:&nbsp;string,&nbsp;base&nbsp;URI&nbsp;for&nbsp;all&nbsp;HTTP&nbsp;requests,&nbsp;usually&nbsp;the&nbsp;discovery&nbsp;URI<br>
&nbsp;&nbsp;future:&nbsp;string,&nbsp;discovery&nbsp;document&nbsp;with&nbsp;future&nbsp;capabilities<br>
&nbsp;&nbsp;auth_discovery:&nbsp;dict,&nbsp;information&nbsp;about&nbsp;the&nbsp;authentication&nbsp;the&nbsp;API&nbsp;supports<br>
&nbsp;&nbsp;http:&nbsp;httplib2.Http,&nbsp;An&nbsp;instance&nbsp;of&nbsp;httplib2.Http&nbsp;or&nbsp;something&nbsp;that&nbsp;acts<br>
&nbsp;&nbsp;&nbsp;&nbsp;like&nbsp;it&nbsp;that&nbsp;HTTP&nbsp;requests&nbsp;will&nbsp;be&nbsp;made&nbsp;through.<br>
&nbsp;&nbsp;developerKey:&nbsp;string,&nbsp;Key&nbsp;for&nbsp;controlling&nbsp;API&nbsp;usage,&nbsp;generated<br>
&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;the&nbsp;API&nbsp;Console.<br>
&nbsp;&nbsp;model:&nbsp;Model&nbsp;class&nbsp;instance&nbsp;that&nbsp;serializes&nbsp;and<br>
&nbsp;&nbsp;&nbsp;&nbsp;de-serializes&nbsp;requests&nbsp;and&nbsp;responses.<br>
&nbsp;&nbsp;requestBuilder:&nbsp;Takes&nbsp;an&nbsp;http&nbsp;request&nbsp;and&nbsp;packages&nbsp;it&nbsp;up&nbsp;to&nbsp;be&nbsp;executed.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;A&nbsp;Resource&nbsp;object&nbsp;with&nbsp;methods&nbsp;for&nbsp;interacting&nbsp;with<br>
&nbsp;&nbsp;the&nbsp;service.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__all__</strong> = ['build', 'build_from_document']<br>
<strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">jcgregorio@google.com&nbsp;(Joe&nbsp;Gregorio)</td></tr></table>
</body></html>